<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script language="JavaScript">

			function openWin(){
				var dw;
				dw=window.open();
				dw.document.open();
				dw.document.write("<html><head><title>一个新的窗口</title>");
				dw.document.write("</head>");
				dw.document.write("<body>");
				dw.document.write("<img name='i1' src='img/docs-github.png'><br />");
				dw.document.write("这里是写入的新内容<br />");
				dw.document.write("</body></html>");
				dw.document.close();
			}
			function addSelect(){
				var sel=document.createElement("select");
				sel.options[0]=new Option("篮球","");
				sel.options[1]=new Option("足球","");
				sel.options[2]=new Option("排球","");
				sel.options[3]=new Option("乒乓球","");
				document.form1.appendChild(sel);
			}
		</script>		
		
		
	</head>
	
	<body>
		
		<input type="button" value="打开一个新文档" onclick="openWin();" />
		
		<form name="form1">
		
			<input type="button" name="btn1" value="动态添加下拉菜单" onclick="addSelect();" />
		
		
		
		
		</form>
		
	</body>
</html>
